package com.campus.customer.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 退款请求DTO
 *
 * @author ZhaoYuJie
 * @since 2025-01-15
 */
@Data
@ApiModel(value = "RefundRequestDTO", description = "退款请求参数")
public class RefundRequestDTO {
    @ApiModelProperty("子商户号")
    @NotBlank(message = "子商户号不能为空")
    private String subMchid;

    @ApiModelProperty(value = "订单ID", required = true)
    @NotBlank(message = "订单ID不能为空")
    private String orderId;

    @ApiModelProperty(value = "退款金额", required = true)
    @NotNull(message = "退款金额不能为空")
    @DecimalMin(value = "0.01", message = "退款金额必须大于0")
    private BigDecimal refundAmount;

    @ApiModelProperty(value = "退款原因", required = true)
    @NotBlank(message = "退款原因不能为空")
    private String refundReason;

    @ApiModelProperty(value = "退款类型：1-商户拒单，2-用户取消，3-系统退款，4-客服退款", required = true)
    @NotNull(message = "退款类型不能为空")
    private Integer refundType;

    @ApiModelProperty(value = "操作人ID")
    private Integer operatorId;

    @ApiModelProperty(value = "操作人类型：1-商户，2-用户，3-系统，4-客服", required = true)
    @NotNull(message = "操作人类型不能为空")
    private Integer operatorType;

    @ApiModelProperty(value = "备注信息")
    private String remark;

    @ApiModelProperty(value = "微信支付交易号")
    private String wechatTransactionId;

}